﻿CREATE TABLE [dbo].[DatabaseUser] (
    [DatabaseUserId] INT             IDENTITY (1, 1) NOT NULL,
    [Name]           VARCHAR (4000)   NULL,
    [SID]            VARBINARY (100) NULL,
    [CreateDate]     DATETIME        NULL,
    [DefaultSchema]  VARCHAR (4000)   NULL,
    [DatabaseID]     INT             NULL,
    CONSTRAINT [PK_DatabaseUser] PRIMARY KEY CLUSTERED ([DatabaseUserId] ASC),
    CONSTRAINT [FK_DatabaseUser_Database] FOREIGN KEY ([DatabaseID]) REFERENCES [dbo].[Database] ([DatabaseID])
);

